<template>
  <div>
    <page-dec>
      <template v-slot:DescName>{{ our.viewDescTitle }}</template>
      <template v-slot:DescContent>{{ our.viewDescText }}</template>
    </page-dec>
    <div class="title">{{ title.title }}</div>
    <div class="line"></div>
    <div class="notice">
      <div class="title1">{{ notice.noticeTitle }}</div>
      <div class="author">{{ notice.noticeAuthor }}</div>
      <div class="content">{{ notice.noticeContent }}</div>
    </div>
    <div class="line"></div>
  </div>
</template>

<script>
import pageDec from "@/components/pageDec.vue";
import axios from "axios";
export default {
  components: {
    pageDec,
  },
  created() {
    this.createData();
  },
  data() {
    return {
      our: "",
      title: "",
      notice: "",
    };
  },
  methods: {
    //  页面数据获取
    async createData() {
      axios({
        method: "get",
        url: "json/notice.json",
      }).then((res) => {
        this.our = res.data.viewDesc;
        this.title = res.data.navigation;
        this.notice = res.data.notice;
      });
      const {data:res} = await this.$axios.get("/OfficialWebsite/all")
      if(res.code === 200){
        // console.log('公告页面',res);
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.title {
  font-weight: 700;
  font-size: 47px;
  margin-left: 10%;
  margin-top: 100px;
  color: #1694e8;
}
.line {
  height: 2px;
  width: 80%;
  background-color: #1694e8;
  margin: auto;
  margin-bottom: 20px;
}
.notice {
  width: 80%;
//   background-color: green;
  margin: auto;
  margin-top: 10px;
  padding: 20px;
  box-sizing: border-box;
  margin-bottom: 10px;
  text-align: center;
  .title1 {
    font-weight: 700;
    font-size: 50px;
  }
  .author {
    font-weight: 400;
    font-size: 20px;
    color: rgba(102, 102, 102, 1);
    margin-top: 10px;
  }
  .content {
    text-indent: 2em;
    font-weight: 400;
    font-size: 20px;
    text-align: left;
    margin-top: 10px;
  }
}
</style>